main(){int x,y,i,f[4][2]={{10,0},{0,-10},{-10,0},{0,10}},t;char d[201],*p;while(gets(d)){printf("300 420 moveto\n310 420 lineto\n");x=310;y=420;t=0;p=d;while(*p){t=(*p++==86)?t-1:t+1;t=(t<0)?3:t;t=(t>3)?0:t;x+=f[t][0];y+=f[t][1];printf("%d %d lineto\n",x,y);}printf("stroke\nshowpage\n");}}
